/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package wiiscript;

import java.io.File;
import javax.swing.filechooser.FileFilter;

/**
 *
 * @author Evan
 */
public class ScriptFilter extends FileFilter {
    public boolean accept(File pathname) {
        if (pathname.isDirectory()) return true;
        String name = pathname.getName().toLowerCase();
        if (name.endsWith(".pie") || name.endsWith(".txt")) return true;
        return false;
    }
    @Override
    public String getDescription() {
        return "All supported files (*.pie, *.txt)";
    }
}
